
<%@ page import="br.edu.ufam.avaliacao.Indicador" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'indicador.label', default: 'Indicador')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="Início"/></a></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="Novo Indicador" args="[entityName]" /></g:link></span>
            </div>
            <div class="body" style="width: 1000px">
                <h1><g:message code="Lista de Indicadores" /></h1>
            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>

                            <g:sortableColumn property="titulo" title="${message(code: 'indicador.titulo.label', default: 'Titulo')}" />

                            <g:sortableColumn property="dimensao" title="${message(code: 'indicador.dimensao.label', default: 'Dimensao')}" />

                        </tr>
                    </thead>
                    <tbody>
                        <g:each in="${indicadorInstanceList}" status="i" var="indicadorInstance">
                            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                                <td><g:link action="show" id="${indicadorInstance.id}">${fieldValue(bean: indicadorInstance, field: "titulo")}</g:link></td>

                                <td><g:link action="show" id="${indicadorInstance.id}">${fieldValue(bean: indicadorInstance, field: "dimensao")}</g:link></td>

                            </tr>
                        </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${indicadorInstanceTotal}" next="Próximo" prev="Anterior" />
            </div>
        </div>
    </body>
</html>
